import App from './App'

// #ifndef VUE3
import Vue from 'vue'
// import './uni.promisify.adaptor'
import {
  uploadFile,
  callPhone,
  setStorageSync,
  getStorageSync,
  removeStorageSync,
  clearStorageSync
} from './untils/pubic.js'
// Vue.config.productionTip = false


// const amapFile = require('./untils/amap-wx.130.js');
// import { AMapWX } from './untils/amap-wx.130.js'
// 注入全局属性
// import inject from './untils/register'
// Vue.use(inject)


// Vue.prototype.myAmapFun = new AMapWX({
// 	key: '337045d70909431d3fad8e1c2a415cf3',
// 	batch: true
// })

Vue.prototype.$getImageSrc = (name) => {
  let baseImg = 'https://static.myxiangyu.com/image/'
  return baseImg + name
}
Vue.prototype.$uploadFile = uploadFile
Vue.prototype.$callPhone = callPhone

Vue.prototype.$setStorageSync = setStorageSync
Vue.prototype.$getStorageSync = getStorageSync
Vue.prototype.$removeStorageSync = removeStorageSync
Vue.prototype.$clearStorageSync = clearStorageSync

App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif